In many application environments, an image is compressed (or encoded) to reduce the total amount of data needed to represent the image. The compressed data may then be stored or transmitted more efficiently than the original uncompressed image data.
Block truncation coding (BTC) is a common lossy image encoding technique. BTC is a simple and fast compression method and therefore is useful in printing applications. The BTC technique quantises blocks of pixels in an image in a way that preserves the first and second moments of pixel values in the block (i.e., the mean of values and the mean of squares of values in the quantised blocks are the same as in the original blocks). In accordance with the BTC technique, a greyscale image is divided into square blocks of m pixels. The pixels of a given block with values smaller than the mean pixel value for the given block are segmented into a light pixel group and the pixels with values greater than or equal to the mean pixel value are segmented into a dark pixel group. Two quantisation levels a, b are computed for the given pixel as follows:a=x−σ√{square root over (q/(m−q))}  (1)b=x+σ√{square root over ((m−q)/q)}  (2)where x is the mean of the pixel values in the block, σ is the standard deviation of the pixel values in the block, and q is the number of pixels in the light pixel group. The pixel values in the light pixel group are mapped to a, and the pixel values in the dark pixel group are mapped to b. Each block is encoded as (x, σ, B), where B is a binary vector of length m referred to as a mask (also called a bit plane or a bit map). The mask B indicates which pixel locations in a block are assigned to the light pixel group and which pixel locations are assigned to the dark pixel group. During decoding, the quantisation levels a and b of each block are computed from the values x and σ in the encoded data using equations (1) and (2), and every pixel in the decoded image is assigned one of the quantisation levels in accordance with the mask B.
By representing each block of pixels by first and second moment values and, optionally, a mask, the BTC method achieves a significant compression of the original image data. Additional compression of the image data may be achieved by encoding the BTC quantisation data using, for example, run-length coding and variable length coding techniques.
According to an aspect of the invention there is provided a method of decoding (decompressing) cell data comprising forming cells of a constant physical size from the cell data regardless of the resolution of an image to be formed from the cell data.
Other aspects of the invention are as outlined in the claims.
If an aspect of the invention is claimed or described in a particular manifestation (eg as apparatus, method, system, software etc) then it is not intended to be limited to this manifestation. The skilled person will understand that, for example, what is claimed as a method is equally inventive when expressed as apparatus or perhaps software arranged to carry out the method (for example when the software is provided on a data carrier).